 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKIpanti/IpantiModel.h>

@implementation OriginAddrItem
-(id) initWithIp:(NSString*) ip
      weight:(NSNumber*)weight
      inJdCloud:(NSNumber*)inJdCloud { 
     self.ip = ip;               
     self.weight = weight;               
     self.inJdCloud = inJdCloud;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    if([self weight])
    {
        [result setValue:[self weight] forKey:@"weight"];
    }
    if([self inJdCloud])
    {
        [result setValue:[self inJdCloud] forKey:@"inJdCloud"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ip = [dictionary objectForKey:@"ip"];
    self.weight = [dictionary objectForKey:@"weight"];
    self.inJdCloud = [dictionary objectForKey:@"inJdCloud"];
    return self;
}
 @end
@implementation WebRuleProtocol
-(id) initWithHttp:(NSNumber*) http
      https:(NSNumber*)https { 
     self.http = http;               
     self.https = https;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self http])
    {
        [result setValue:[self http] forKey:@"http"];
    }
    if([self https])
    {
        [result setValue:[self https] forKey:@"https"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.http = [dictionary objectForKey:@"http"];
    self.https = [dictionary objectForKey:@"https"];
    return self;
}
 @end
@implementation ModifyBlackListRuleOfForwardRuleSpec
-(id) initWithIpSetId:(NSString*) ipSetId { 
     self.ipSetId = ipSetId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ipSetId])
    {
        [result setValue:[self ipSetId] forKey:@"ipSetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ipSetId = [dictionary objectForKey:@"ipSetId"];
    return self;
}
 @end
@implementation CpsIpResource
-(id) initWithIp:(NSString*) ip
      resourceType:(NSNumber*)resourceType { 
     self.ip = ip;               
     self.resourceType = resourceType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    if([self resourceType])
    {
        [result setValue:[self resourceType] forKey:@"resourceType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ip = [dictionary objectForKey:@"ip"];
    self.resourceType = [dictionary objectForKey:@"resourceType"];
    return self;
}
 @end
@implementation RenameInstanceSpec
-(id) initWithName:(NSString*) name { 
     self.name = name;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    return self;
}
 @end
@implementation CertificateSpec
-(id) initWithName:(NSString*) name
      content:(NSString*)content
      rsaKey:(NSString*)rsaKey { 
     self.name = name;               
     self.content = content;               
     self.rsaKey = rsaKey;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self content])
    {
        [result setValue:[self content] forKey:@"content"];
    }
    if([self rsaKey])
    {
        [result setValue:[self rsaKey] forKey:@"rsaKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.content = [dictionary objectForKey:@"content"];
    self.rsaKey = [dictionary objectForKey:@"rsaKey"];
    return self;
}
 @end
@implementation ForwardBlackListRule
-(id) initWithStatus:(NSNumber*) status
      ipSetId:(NSString*)ipSetId
      ipSetName:(NSString*)ipSetName
      ip:(NSArray<NSString*>*)ip { 
     self.status = status;               
     self.ipSetId = ipSetId;               
     self.ipSetName = ipSetName;               
     self.ip = ip;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self ipSetId])
    {
        [result setValue:[self ipSetId] forKey:@"ipSetId"];
    }
    if([self ipSetName])
    {
        [result setValue:[self ipSetName] forKey:@"ipSetName"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.ipSetId = [dictionary objectForKey:@"ipSetId"];
    self.ipSetName = [dictionary objectForKey:@"ipSetName"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
}
 @end
@implementation AttackTypeCount
-(id) initWithType:(NSString*) type
      count:(NSNumber*)count { 
     self.type = type;               
     self.count = count;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self count])
    {
        [result setValue:[self count] forKey:@"count"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.type = [dictionary objectForKey:@"type"];
    self.count = [dictionary objectForKey:@"count"];
    return self;
}
 @end
@implementation CCAttackLogDetail
-(id) initWithKey:(NSString*) key
      num:(NSNumber*)num { 
     self.key = key;               
     self.num = num;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self num])
    {
        [result setValue:[self num] forKey:@"num"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.key = [dictionary objectForKey:@"key"];
    self.num = [dictionary objectForKey:@"num"];
    return self;
}
 @end
@implementation IpSet
-(id) initWithId:(NSString*) idValue
      name:(NSString*)name
      ip:(NSArray<NSString*>*)ip { 
     self.idValue = idValue;               
     self.name = name;               
     self.ip = ip;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.name = [dictionary objectForKey:@"name"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
}
 @end
@implementation ProtectionOutline
-(id) initWithInstancesCount:(NSNumber*) instancesCount
      protectedCount:(NSNumber*)protectedCount
      protectedDay:(NSNumber*)protectedDay
      weekAttackCount:(NSNumber*)weekAttackCount
      weekAttackPeak:(NSNumber*)weekAttackPeak
      weekAttackUnit:(NSString*)weekAttackUnit
      monthAttackCount:(NSNumber*)monthAttackCount
      monthAttackPeak:(NSNumber*)monthAttackPeak
      monthAttackUnit:(NSString*)monthAttackUnit { 
     self.instancesCount = instancesCount;               
     self.protectedCount = protectedCount;               
     self.protectedDay = protectedDay;               
     self.weekAttackCount = weekAttackCount;               
     self.weekAttackPeak = weekAttackPeak;               
     self.weekAttackUnit = weekAttackUnit;               
     self.monthAttackCount = monthAttackCount;               
     self.monthAttackPeak = monthAttackPeak;               
     self.monthAttackUnit = monthAttackUnit;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instancesCount])
    {
        [result setValue:[self instancesCount] forKey:@"instancesCount"];
    }
    if([self protectedCount])
    {
        [result setValue:[self protectedCount] forKey:@"protectedCount"];
    }
    if([self protectedDay])
    {
        [result setValue:[self protectedDay] forKey:@"protectedDay"];
    }
    if([self weekAttackCount])
    {
        [result setValue:[self weekAttackCount] forKey:@"weekAttackCount"];
    }
    if([self weekAttackPeak])
    {
        [result setValue:[self weekAttackPeak] forKey:@"weekAttackPeak"];
    }
    if([self weekAttackUnit])
    {
        [result setValue:[self weekAttackUnit] forKey:@"weekAttackUnit"];
    }
    if([self monthAttackCount])
    {
        [result setValue:[self monthAttackCount] forKey:@"monthAttackCount"];
    }
    if([self monthAttackPeak])
    {
        [result setValue:[self monthAttackPeak] forKey:@"monthAttackPeak"];
    }
    if([self monthAttackUnit])
    {
        [result setValue:[self monthAttackUnit] forKey:@"monthAttackUnit"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instancesCount = [dictionary objectForKey:@"instancesCount"];
    self.protectedCount = [dictionary objectForKey:@"protectedCount"];
    self.protectedDay = [dictionary objectForKey:@"protectedDay"];
    self.weekAttackCount = [dictionary objectForKey:@"weekAttackCount"];
    self.weekAttackPeak = [dictionary objectForKey:@"weekAttackPeak"];
    self.weekAttackUnit = [dictionary objectForKey:@"weekAttackUnit"];
    self.monthAttackCount = [dictionary objectForKey:@"monthAttackCount"];
    self.monthAttackPeak = [dictionary objectForKey:@"monthAttackPeak"];
    self.monthAttackUnit = [dictionary objectForKey:@"monthAttackUnit"];
    return self;
}
 @end
@implementation DDoSAttackLog
-(id) initWithAttackTraffic:(NSNumber*) attackTraffic
      blackHole:(NSNumber*)blackHole
      startTime:(NSString*)startTime
      endTime:(NSString*)endTime
      unit:(NSString*)unit
      instanceId:(NSString*)instanceId
      name:(NSString*)name { 
     self.attackTraffic = attackTraffic;               
     self.blackHole = blackHole;               
     self.startTime = startTime;               
     self.endTime = endTime;               
     self.unit = unit;               
     self.instanceId = instanceId;               
     self.name = name;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self attackTraffic])
    {
        [result setValue:[self attackTraffic] forKey:@"attackTraffic"];
    }
    if([self blackHole])
    {
        [result setValue:[self blackHole] forKey:@"blackHole"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self unit])
    {
        [result setValue:[self unit] forKey:@"unit"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.attackTraffic = [dictionary objectForKey:@"attackTraffic"];
    self.blackHole = [dictionary objectForKey:@"blackHole"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.unit = [dictionary objectForKey:@"unit"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.name = [dictionary objectForKey:@"name"];
    return self;
}
 @end
@implementation CertInfoDescribeSpec
-(id) initWithDomain:(NSString*) domain
      httpsCertContent:(NSString*)httpsCertContent { 
     self.domain = domain;               
     self.httpsCertContent = httpsCertContent;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self domain])
    {
        [result setValue:[self domain] forKey:@"domain"];
    }
    if([self httpsCertContent])
    {
        [result setValue:[self httpsCertContent] forKey:@"httpsCertContent"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domain = [dictionary objectForKey:@"domain"];
    self.httpsCertContent = [dictionary objectForKey:@"httpsCertContent"];
    return self;
}
 @end
@implementation IpBwListSpec
-(id) initWithIpList:(NSArray<NSString*>*) ipList
      tryFlag:(NSNumber*)tryFlag { 
     self.ipList = ipList;               
     self.tryFlag = tryFlag;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ipList])
    {
        [result setValue:[self ipList] forKey:@"ipList"];
    }
    if([self tryFlag])
    {
        [result setValue:[self tryFlag] forKey:@"tryFlag"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ipList = [dictionary objectForKey:@"ipList"];
    self.tryFlag = [dictionary objectForKey:@"tryFlag"];
    return self;
}
 @end
@implementation Geo
-(id) initWithLabel:(NSString*) label
      value:(NSString*)value { 
     self.label = label;               
     self.value = value;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self label])
    {
        [result setValue:[self label] forKey:@"label"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.label = [dictionary objectForKey:@"label"];
    self.value = [dictionary objectForKey:@"value"];
    return self;
}
 @end
@implementation CCProtectionRuleSpec
-(id) initWithName:(NSString*) name
      uri:(NSString*)uri
      matchType:(NSNumber*)matchType
      detectPeriod:(NSNumber*)detectPeriod
      singleIpLimit:(NSNumber*)singleIpLimit
      blockType:(NSNumber*)blockType
      blockTime:(NSNumber*)blockTime { 
     self.name = name;               
     self.uri = uri;               
     self.matchType = matchType;               
     self.detectPeriod = detectPeriod;               
     self.singleIpLimit = singleIpLimit;               
     self.blockType = blockType;               
     self.blockTime = blockTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self uri])
    {
        [result setValue:[self uri] forKey:@"uri"];
    }
    if([self matchType])
    {
        [result setValue:[self matchType] forKey:@"matchType"];
    }
    if([self detectPeriod])
    {
        [result setValue:[self detectPeriod] forKey:@"detectPeriod"];
    }
    if([self singleIpLimit])
    {
        [result setValue:[self singleIpLimit] forKey:@"singleIpLimit"];
    }
    if([self blockType])
    {
        [result setValue:[self blockType] forKey:@"blockType"];
    }
    if([self blockTime])
    {
        [result setValue:[self blockTime] forKey:@"blockTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.uri = [dictionary objectForKey:@"uri"];
    self.matchType = [dictionary objectForKey:@"matchType"];
    self.detectPeriod = [dictionary objectForKey:@"detectPeriod"];
    self.singleIpLimit = [dictionary objectForKey:@"singleIpLimit"];
    self.blockType = [dictionary objectForKey:@"blockType"];
    self.blockTime = [dictionary objectForKey:@"blockTime"];
    return self;
}
 @end
@implementation CCProtectionDefaultConfig
-(id) initWithCcThreshold:(NSNumber*) ccThreshold
      hostQps:(NSNumber*)hostQps
      hostUrlQps:(NSNumber*)hostUrlQps
      ipHostQps:(NSNumber*)ipHostQps
      ipHostUrlQps:(NSNumber*)ipHostUrlQps { 
     self.ccThreshold = ccThreshold;               
     self.hostQps = hostQps;               
     self.hostUrlQps = hostUrlQps;               
     self.ipHostQps = ipHostQps;               
     self.ipHostUrlQps = ipHostUrlQps;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ccThreshold])
    {
        [result setValue:[self ccThreshold] forKey:@"ccThreshold"];
    }
    if([self hostQps])
    {
        [result setValue:[self hostQps] forKey:@"hostQps"];
    }
    if([self hostUrlQps])
    {
        [result setValue:[self hostUrlQps] forKey:@"hostUrlQps"];
    }
    if([self ipHostQps])
    {
        [result setValue:[self ipHostQps] forKey:@"ipHostQps"];
    }
    if([self ipHostUrlQps])
    {
        [result setValue:[self ipHostUrlQps] forKey:@"ipHostUrlQps"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ccThreshold = [dictionary objectForKey:@"ccThreshold"];
    self.hostQps = [dictionary objectForKey:@"hostQps"];
    self.hostUrlQps = [dictionary objectForKey:@"hostUrlQps"];
    self.ipHostQps = [dictionary objectForKey:@"ipHostQps"];
    self.ipHostUrlQps = [dictionary objectForKey:@"ipHostUrlQps"];
    return self;
}
 @end
@implementation InstanceIdName
-(id) initWithId:(NSString*) idValue
      name:(NSString*)name { 
     self.idValue = idValue;               
     self.name = name;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.name = [dictionary objectForKey:@"name"];
    return self;
}
 @end
@implementation AlarmConfig
-(id) initWithBlackHoleAlarmEmailStatus:(NSNumber*) blackHoleAlarmEmailStatus
      blackHoleAlarmSmsStatus:(NSNumber*)blackHoleAlarmSmsStatus
      blackHoleAlarmStatus:(NSNumber*)blackHoleAlarmStatus
      ddosAlarmEmailStatus:(NSNumber*)ddosAlarmEmailStatus
      ddosAlarmSmsStatus:(NSNumber*)ddosAlarmSmsStatus
      ddosAlarmStatus:(NSNumber*)ddosAlarmStatus
      errorCodeAlarmStatus:(NSNumber*)errorCodeAlarmStatus
      errorCodeDomain:(NSArray<NSString*>*)errorCodeDomain { 
     self.blackHoleAlarmEmailStatus = blackHoleAlarmEmailStatus;               
     self.blackHoleAlarmSmsStatus = blackHoleAlarmSmsStatus;               
     self.blackHoleAlarmStatus = blackHoleAlarmStatus;               
     self.ddosAlarmEmailStatus = ddosAlarmEmailStatus;               
     self.ddosAlarmSmsStatus = ddosAlarmSmsStatus;               
     self.ddosAlarmStatus = ddosAlarmStatus;               
     self.errorCodeAlarmStatus = errorCodeAlarmStatus;               
     self.errorCodeDomain = errorCodeDomain;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self blackHoleAlarmEmailStatus])
    {
        [result setValue:[self blackHoleAlarmEmailStatus] forKey:@"blackHoleAlarmEmailStatus"];
    }
    if([self blackHoleAlarmSmsStatus])
    {
        [result setValue:[self blackHoleAlarmSmsStatus] forKey:@"blackHoleAlarmSmsStatus"];
    }
    if([self blackHoleAlarmStatus])
    {
        [result setValue:[self blackHoleAlarmStatus] forKey:@"blackHoleAlarmStatus"];
    }
    if([self ddosAlarmEmailStatus])
    {
        [result setValue:[self ddosAlarmEmailStatus] forKey:@"ddosAlarmEmailStatus"];
    }
    if([self ddosAlarmSmsStatus])
    {
        [result setValue:[self ddosAlarmSmsStatus] forKey:@"ddosAlarmSmsStatus"];
    }
    if([self ddosAlarmStatus])
    {
        [result setValue:[self ddosAlarmStatus] forKey:@"ddosAlarmStatus"];
    }
    if([self errorCodeAlarmStatus])
    {
        [result setValue:[self errorCodeAlarmStatus] forKey:@"errorCodeAlarmStatus"];
    }
    if([self errorCodeDomain])
    {
        [result setValue:[self errorCodeDomain] forKey:@"errorCodeDomain"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.blackHoleAlarmEmailStatus = [dictionary objectForKey:@"blackHoleAlarmEmailStatus"];
    self.blackHoleAlarmSmsStatus = [dictionary objectForKey:@"blackHoleAlarmSmsStatus"];
    self.blackHoleAlarmStatus = [dictionary objectForKey:@"blackHoleAlarmStatus"];
    self.ddosAlarmEmailStatus = [dictionary objectForKey:@"ddosAlarmEmailStatus"];
    self.ddosAlarmSmsStatus = [dictionary objectForKey:@"ddosAlarmSmsStatus"];
    self.ddosAlarmStatus = [dictionary objectForKey:@"ddosAlarmStatus"];
    self.errorCodeAlarmStatus = [dictionary objectForKey:@"errorCodeAlarmStatus"];
    self.errorCodeDomain = [dictionary objectForKey:@"errorCodeDomain"];
    return self;
}
 @end
@implementation PriceSpec
-(id) initWithBuyType:(NSNumber*) buyType
      billingType:(NSNumber*)billingType
      carrier:(NSNumber*)carrier
      bw:(NSNumber*)bw
      bp:(NSNumber*)bp
      ep:(NSNumber*)ep
      idValue:(NSString*)idValue
      timeSpan:(NSNumber*)timeSpan
      timeUnit:(NSNumber*)timeUnit { 
     self.buyType = buyType;               
     self.billingType = billingType;               
     self.carrier = carrier;               
     self.bw = bw;               
     self.bp = bp;               
     self.ep = ep;               
     self.idValue = idValue;               
     self.timeSpan = timeSpan;               
     self.timeUnit = timeUnit;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self buyType])
    {
        [result setValue:[self buyType] forKey:@"buyType"];
    }
    if([self billingType])
    {
        [result setValue:[self billingType] forKey:@"billingType"];
    }
    if([self carrier])
    {
        [result setValue:[self carrier] forKey:@"carrier"];
    }
    if([self bw])
    {
        [result setValue:[self bw] forKey:@"bw"];
    }
    if([self bp])
    {
        [result setValue:[self bp] forKey:@"bp"];
    }
    if([self ep])
    {
        [result setValue:[self ep] forKey:@"ep"];
    }
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self timeSpan])
    {
        [result setValue:[self timeSpan] forKey:@"timeSpan"];
    }
    if([self timeUnit])
    {
        [result setValue:[self timeUnit] forKey:@"timeUnit"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.buyType = [dictionary objectForKey:@"buyType"];
    self.billingType = [dictionary objectForKey:@"billingType"];
    self.carrier = [dictionary objectForKey:@"carrier"];
    self.bw = [dictionary objectForKey:@"bw"];
    self.bp = [dictionary objectForKey:@"bp"];
    self.ep = [dictionary objectForKey:@"ep"];
    self.idValue = [dictionary objectForKey:@"id"];
    self.timeSpan = [dictionary objectForKey:@"timeSpan"];
    self.timeUnit = [dictionary objectForKey:@"timeUnit"];
    return self;
}
 @end
@implementation WebBlackListRuleSpec
-(id) initWithName:(NSString*) name
      mode:(NSNumber*)mode
      key:(NSString*)key
      value:(NSString*)value
      pattern:(NSNumber*)pattern
      action:(NSNumber*)action
      actionValue:(NSString*)actionValue
      status:(NSNumber*)status { 
     self.name = name;               
     self.mode = mode;               
     self.key = key;               
     self.value = value;               
     self.pattern = pattern;               
     self.action = action;               
     self.actionValue = actionValue;               
     self.status = status;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self mode])
    {
        [result setValue:[self mode] forKey:@"mode"];
    }
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    if([self pattern])
    {
        [result setValue:[self pattern] forKey:@"pattern"];
    }
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self actionValue])
    {
        [result setValue:[self actionValue] forKey:@"actionValue"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.mode = [dictionary objectForKey:@"mode"];
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    self.pattern = [dictionary objectForKey:@"pattern"];
    self.action = [dictionary objectForKey:@"action"];
    self.actionValue = [dictionary objectForKey:@"actionValue"];
    self.status = [dictionary objectForKey:@"status"];
    return self;
}
 @end
@implementation Instance
-(id) initWithId:(NSString*) idValue
      name:(NSString*)name
      carrier:(NSNumber*)carrier
      ipType:(NSNumber*)ipType
      elasticTriggerCount:(NSNumber*)elasticTriggerCount
      abovePeakCount:(NSNumber*)abovePeakCount
      inBitslimit:(NSNumber*)inBitslimit
      resilientBitslimit:(NSNumber*)resilientBitslimit
      businessBitslimit:(NSNumber*)businessBitslimit
      ccThreshold:(NSNumber*)ccThreshold
      ccPeakQPS:(NSNumber*)ccPeakQPS
      ruleCount:(NSNumber*)ruleCount
      webRuleCount:(NSNumber*)webRuleCount
      chargeStatus:(NSString*)chargeStatus
      securityStatus:(NSString*)securityStatus
      createTime:(NSString*)createTime
      expireTime:(NSString*)expireTime
      resourceId:(NSString*)resourceId
      ccObserveMode:(NSNumber*)ccObserveMode
      ccProtectMode:(NSNumber*)ccProtectMode
      ccProtectStatus:(NSNumber*)ccProtectStatus
      ccSpeedLimit:(NSNumber*)ccSpeedLimit
      ccSpeedPeriod:(NSNumber*)ccSpeedPeriod
      ipBlackList:(NSArray<NSString*>*)ipBlackList
      ipBlackStatus:(NSNumber*)ipBlackStatus
      ipWhiteList:(NSArray<NSString*>*)ipWhiteList
      ipWhiteStatus:(NSNumber*)ipWhiteStatus
      urlWhitelist:(NSArray<NSString*>*)urlWhitelist
      urlWhitelistStatus:(NSNumber*)urlWhitelistStatus
      hostQps:(NSNumber*)hostQps
      hostUrlQps:(NSNumber*)hostUrlQps
      ipHostQps:(NSNumber*)ipHostQps
      ipHostUrlQps:(NSNumber*)ipHostUrlQps { 
     self.idValue = idValue;               
     self.name = name;               
     self.carrier = carrier;               
     self.ipType = ipType;               
     self.elasticTriggerCount = elasticTriggerCount;               
     self.abovePeakCount = abovePeakCount;               
     self.inBitslimit = inBitslimit;               
     self.resilientBitslimit = resilientBitslimit;               
     self.businessBitslimit = businessBitslimit;               
     self.ccThreshold = ccThreshold;               
     self.ccPeakQPS = ccPeakQPS;               
     self.ruleCount = ruleCount;               
     self.webRuleCount = webRuleCount;               
     self.chargeStatus = chargeStatus;               
     self.securityStatus = securityStatus;               
     self.createTime = createTime;               
     self.expireTime = expireTime;               
     self.resourceId = resourceId;               
     self.ccObserveMode = ccObserveMode;               
     self.ccProtectMode = ccProtectMode;               
     self.ccProtectStatus = ccProtectStatus;               
     self.ccSpeedLimit = ccSpeedLimit;               
     self.ccSpeedPeriod = ccSpeedPeriod;               
     self.ipBlackList = ipBlackList;               
     self.ipBlackStatus = ipBlackStatus;               
     self.ipWhiteList = ipWhiteList;               
     self.ipWhiteStatus = ipWhiteStatus;               
     self.urlWhitelist = urlWhitelist;               
     self.urlWhitelistStatus = urlWhitelistStatus;               
     self.hostQps = hostQps;               
     self.hostUrlQps = hostUrlQps;               
     self.ipHostQps = ipHostQps;               
     self.ipHostUrlQps = ipHostUrlQps;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self carrier])
    {
        [result setValue:[self carrier] forKey:@"carrier"];
    }
    if([self ipType])
    {
        [result setValue:[self ipType] forKey:@"ipType"];
    }
    if([self elasticTriggerCount])
    {
        [result setValue:[self elasticTriggerCount] forKey:@"elasticTriggerCount"];
    }
    if([self abovePeakCount])
    {
        [result setValue:[self abovePeakCount] forKey:@"abovePeakCount"];
    }
    if([self inBitslimit])
    {
        [result setValue:[self inBitslimit] forKey:@"inBitslimit"];
    }
    if([self resilientBitslimit])
    {
        [result setValue:[self resilientBitslimit] forKey:@"resilientBitslimit"];
    }
    if([self businessBitslimit])
    {
        [result setValue:[self businessBitslimit] forKey:@"businessBitslimit"];
    }
    if([self ccThreshold])
    {
        [result setValue:[self ccThreshold] forKey:@"ccThreshold"];
    }
    if([self ccPeakQPS])
    {
        [result setValue:[self ccPeakQPS] forKey:@"ccPeakQPS"];
    }
    if([self ruleCount])
    {
        [result setValue:[self ruleCount] forKey:@"ruleCount"];
    }
    if([self webRuleCount])
    {
        [result setValue:[self webRuleCount] forKey:@"webRuleCount"];
    }
    if([self chargeStatus])
    {
        [result setValue:[self chargeStatus] forKey:@"chargeStatus"];
    }
    if([self securityStatus])
    {
        [result setValue:[self securityStatus] forKey:@"securityStatus"];
    }
    if([self createTime])
    {
        [result setValue:[self createTime] forKey:@"createTime"];
    }
    if([self expireTime])
    {
        [result setValue:[self expireTime] forKey:@"expireTime"];
    }
    if([self resourceId])
    {
        [result setValue:[self resourceId] forKey:@"resourceId"];
    }
    if([self ccObserveMode])
    {
        [result setValue:[self ccObserveMode] forKey:@"ccObserveMode"];
    }
    if([self ccProtectMode])
    {
        [result setValue:[self ccProtectMode] forKey:@"ccProtectMode"];
    }
    if([self ccProtectStatus])
    {
        [result setValue:[self ccProtectStatus] forKey:@"ccProtectStatus"];
    }
    if([self ccSpeedLimit])
    {
        [result setValue:[self ccSpeedLimit] forKey:@"ccSpeedLimit"];
    }
    if([self ccSpeedPeriod])
    {
        [result setValue:[self ccSpeedPeriod] forKey:@"ccSpeedPeriod"];
    }
    if([self ipBlackList])
    {
        [result setValue:[self ipBlackList] forKey:@"ipBlackList"];
    }
    if([self ipBlackStatus])
    {
        [result setValue:[self ipBlackStatus] forKey:@"ipBlackStatus"];
    }
    if([self ipWhiteList])
    {
        [result setValue:[self ipWhiteList] forKey:@"ipWhiteList"];
    }
    if([self ipWhiteStatus])
    {
        [result setValue:[self ipWhiteStatus] forKey:@"ipWhiteStatus"];
    }
    if([self urlWhitelist])
    {
        [result setValue:[self urlWhitelist] forKey:@"urlWhitelist"];
    }
    if([self urlWhitelistStatus])
    {
        [result setValue:[self urlWhitelistStatus] forKey:@"urlWhitelistStatus"];
    }
    if([self hostQps])
    {
        [result setValue:[self hostQps] forKey:@"hostQps"];
    }
    if([self hostUrlQps])
    {
        [result setValue:[self hostUrlQps] forKey:@"hostUrlQps"];
    }
    if([self ipHostQps])
    {
        [result setValue:[self ipHostQps] forKey:@"ipHostQps"];
    }
    if([self ipHostUrlQps])
    {
        [result setValue:[self ipHostUrlQps] forKey:@"ipHostUrlQps"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.name = [dictionary objectForKey:@"name"];
    self.carrier = [dictionary objectForKey:@"carrier"];
    self.ipType = [dictionary objectForKey:@"ipType"];
    self.elasticTriggerCount = [dictionary objectForKey:@"elasticTriggerCount"];
    self.abovePeakCount = [dictionary objectForKey:@"abovePeakCount"];
    self.inBitslimit = [dictionary objectForKey:@"inBitslimit"];
    self.resilientBitslimit = [dictionary objectForKey:@"resilientBitslimit"];
    self.businessBitslimit = [dictionary objectForKey:@"businessBitslimit"];
    self.ccThreshold = [dictionary objectForKey:@"ccThreshold"];
    self.ccPeakQPS = [dictionary objectForKey:@"ccPeakQPS"];
    self.ruleCount = [dictionary objectForKey:@"ruleCount"];
    self.webRuleCount = [dictionary objectForKey:@"webRuleCount"];
    self.chargeStatus = [dictionary objectForKey:@"chargeStatus"];
    self.securityStatus = [dictionary objectForKey:@"securityStatus"];
    self.createTime = [dictionary objectForKey:@"createTime"];
    self.expireTime = [dictionary objectForKey:@"expireTime"];
    self.resourceId = [dictionary objectForKey:@"resourceId"];
    self.ccObserveMode = [dictionary objectForKey:@"ccObserveMode"];
    self.ccProtectMode = [dictionary objectForKey:@"ccProtectMode"];
    self.ccProtectStatus = [dictionary objectForKey:@"ccProtectStatus"];
    self.ccSpeedLimit = [dictionary objectForKey:@"ccSpeedLimit"];
    self.ccSpeedPeriod = [dictionary objectForKey:@"ccSpeedPeriod"];
    self.ipBlackList = [dictionary objectForKey:@"ipBlackList"];
    self.ipBlackStatus = [dictionary objectForKey:@"ipBlackStatus"];
    self.ipWhiteList = [dictionary objectForKey:@"ipWhiteList"];
    self.ipWhiteStatus = [dictionary objectForKey:@"ipWhiteStatus"];
    self.urlWhitelist = [dictionary objectForKey:@"urlWhitelist"];
    self.urlWhitelistStatus = [dictionary objectForKey:@"urlWhitelistStatus"];
    self.hostQps = [dictionary objectForKey:@"hostQps"];
    self.hostUrlQps = [dictionary objectForKey:@"hostUrlQps"];
    self.ipHostQps = [dictionary objectForKey:@"ipHostQps"];
    self.ipHostUrlQps = [dictionary objectForKey:@"ipHostUrlQps"];
    return self;
}
 @end
@implementation CCProtectionConfig
-(id) initWithEnable:(NSNumber*) enable
      observerMode:(NSNumber*)observerMode
      level:(NSNumber*)level
      ccThreshold:(NSNumber*)ccThreshold
      hostQps:(NSNumber*)hostQps
      hostUrlQps:(NSNumber*)hostUrlQps
      ipHostQps:(NSNumber*)ipHostQps
      ipHostUrlQps:(NSNumber*)ipHostUrlQps
      ccProtectionRuleEnableCount:(NSNumber*)ccProtectionRuleEnableCount { 
     self.enable = enable;               
     self.observerMode = observerMode;               
     self.level = level;               
     self.ccThreshold = ccThreshold;               
     self.hostQps = hostQps;               
     self.hostUrlQps = hostUrlQps;               
     self.ipHostQps = ipHostQps;               
     self.ipHostUrlQps = ipHostUrlQps;               
     self.ccProtectionRuleEnableCount = ccProtectionRuleEnableCount;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self enable])
    {
        [result setValue:[self enable] forKey:@"enable"];
    }
    if([self observerMode])
    {
        [result setValue:[self observerMode] forKey:@"observerMode"];
    }
    if([self level])
    {
        [result setValue:[self level] forKey:@"level"];
    }
    if([self ccThreshold])
    {
        [result setValue:[self ccThreshold] forKey:@"ccThreshold"];
    }
    if([self hostQps])
    {
        [result setValue:[self hostQps] forKey:@"hostQps"];
    }
    if([self hostUrlQps])
    {
        [result setValue:[self hostUrlQps] forKey:@"hostUrlQps"];
    }
    if([self ipHostQps])
    {
        [result setValue:[self ipHostQps] forKey:@"ipHostQps"];
    }
    if([self ipHostUrlQps])
    {
        [result setValue:[self ipHostUrlQps] forKey:@"ipHostUrlQps"];
    }
    if([self ccProtectionRuleEnableCount])
    {
        [result setValue:[self ccProtectionRuleEnableCount] forKey:@"ccProtectionRuleEnableCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.enable = [dictionary objectForKey:@"enable"];
    self.observerMode = [dictionary objectForKey:@"observerMode"];
    self.level = [dictionary objectForKey:@"level"];
    self.ccThreshold = [dictionary objectForKey:@"ccThreshold"];
    self.hostQps = [dictionary objectForKey:@"hostQps"];
    self.hostUrlQps = [dictionary objectForKey:@"hostUrlQps"];
    self.ipHostQps = [dictionary objectForKey:@"ipHostQps"];
    self.ipHostUrlQps = [dictionary objectForKey:@"ipHostUrlQps"];
    self.ccProtectionRuleEnableCount = [dictionary objectForKey:@"ccProtectionRuleEnableCount"];
    return self;
}
 @end
@implementation ModifyWhiteListRuleOfForwardRuleSpec
-(id) initWithIpSetId:(NSString*) ipSetId { 
     self.ipSetId = ipSetId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ipSetId])
    {
        [result setValue:[self ipSetId] forKey:@"ipSetId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ipSetId = [dictionary objectForKey:@"ipSetId"];
    return self;
}
 @end
@implementation CCProtectionConfigSpec
-(id) initWithLevel:(NSNumber*) level
      ccThreshold:(NSNumber*)ccThreshold
      hostQps:(NSNumber*)hostQps
      hostUrlQps:(NSNumber*)hostUrlQps
      ipHostQps:(NSNumber*)ipHostQps
      ipHostUrlQps:(NSNumber*)ipHostUrlQps { 
     self.level = level;               
     self.ccThreshold = ccThreshold;               
     self.hostQps = hostQps;               
     self.hostUrlQps = hostUrlQps;               
     self.ipHostQps = ipHostQps;               
     self.ipHostUrlQps = ipHostUrlQps;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self level])
    {
        [result setValue:[self level] forKey:@"level"];
    }
    if([self ccThreshold])
    {
        [result setValue:[self ccThreshold] forKey:@"ccThreshold"];
    }
    if([self hostQps])
    {
        [result setValue:[self hostQps] forKey:@"hostQps"];
    }
    if([self hostUrlQps])
    {
        [result setValue:[self hostUrlQps] forKey:@"hostUrlQps"];
    }
    if([self ipHostQps])
    {
        [result setValue:[self ipHostQps] forKey:@"ipHostQps"];
    }
    if([self ipHostUrlQps])
    {
        [result setValue:[self ipHostUrlQps] forKey:@"ipHostUrlQps"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.level = [dictionary objectForKey:@"level"];
    self.ccThreshold = [dictionary objectForKey:@"ccThreshold"];
    self.hostQps = [dictionary objectForKey:@"hostQps"];
    self.hostUrlQps = [dictionary objectForKey:@"hostUrlQps"];
    self.ipHostQps = [dictionary objectForKey:@"ipHostQps"];
    self.ipHostUrlQps = [dictionary objectForKey:@"ipHostUrlQps"];
    return self;
}
 @end
@implementation BwRepeatMsg
-(id) initWithBlack:(NSString*) black
      white:(NSString*)white { 
     self.black = black;               
     self.white = white;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self black])
    {
        [result setValue:[self black] forKey:@"black"];
    }
    if([self white])
    {
        [result setValue:[self white] forKey:@"white"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.black = [dictionary objectForKey:@"black"];
    self.white = [dictionary objectForKey:@"white"];
    return self;
}
 @end
@implementation CertInfo
-(id) initWithDomain:(NSString*) domain
      from:(NSString*)from
      to:(NSString*)to
      user:(NSString*)user
      sigAlgName:(NSString*)sigAlgName
      issuer:(NSString*)issuer { 
     self.domain = domain;               
     self.from = from;               
     self.to = to;               
     self.user = user;               
     self.sigAlgName = sigAlgName;               
     self.issuer = issuer;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self domain])
    {
        [result setValue:[self domain] forKey:@"domain"];
    }
    if([self from])
    {
        [result setValue:[self from] forKey:@"from"];
    }
    if([self to])
    {
        [result setValue:[self to] forKey:@"to"];
    }
    if([self user])
    {
        [result setValue:[self user] forKey:@"user"];
    }
    if([self sigAlgName])
    {
        [result setValue:[self sigAlgName] forKey:@"sigAlgName"];
    }
    if([self issuer])
    {
        [result setValue:[self issuer] forKey:@"issuer"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domain = [dictionary objectForKey:@"domain"];
    self.from = [dictionary objectForKey:@"from"];
    self.to = [dictionary objectForKey:@"to"];
    self.user = [dictionary objectForKey:@"user"];
    self.sigAlgName = [dictionary objectForKey:@"sigAlgName"];
    self.issuer = [dictionary objectForKey:@"issuer"];
    return self;
}
 @end
@implementation ForwardProtectionRuleSpec
-(id) initWithSpoofIpEnable:(NSNumber*) spoofIpEnable
      srcNewConnLimitEnable:(NSNumber*)srcNewConnLimitEnable
      srcNewConnLimitValue:(NSNumber*)srcNewConnLimitValue
      srcConcurrentConnLimitEnable:(NSNumber*)srcConcurrentConnLimitEnable
      srcConcurrentConnLimitValue:(NSNumber*)srcConcurrentConnLimitValue
      dstNewConnLimitEnable:(NSNumber*)dstNewConnLimitEnable
      dstNewConnLimitValue:(NSNumber*)dstNewConnLimitValue
      dstConcurrentConnLimitEnable:(NSNumber*)dstConcurrentConnLimitEnable
      dstConcurrentConnLimitValue:(NSNumber*)dstConcurrentConnLimitValue
      datagramRangeMin:(NSNumber*)datagramRangeMin
      datagramRangeMax:(NSNumber*)datagramRangeMax
      geoBlackList:(NSArray<NSString*>*)geoBlackList { 
     self.spoofIpEnable = spoofIpEnable;               
     self.srcNewConnLimitEnable = srcNewConnLimitEnable;               
     self.srcNewConnLimitValue = srcNewConnLimitValue;               
     self.srcConcurrentConnLimitEnable = srcConcurrentConnLimitEnable;               
     self.srcConcurrentConnLimitValue = srcConcurrentConnLimitValue;               
     self.dstNewConnLimitEnable = dstNewConnLimitEnable;               
     self.dstNewConnLimitValue = dstNewConnLimitValue;               
     self.dstConcurrentConnLimitEnable = dstConcurrentConnLimitEnable;               
     self.dstConcurrentConnLimitValue = dstConcurrentConnLimitValue;               
     self.datagramRangeMin = datagramRangeMin;               
     self.datagramRangeMax = datagramRangeMax;               
     self.geoBlackList = geoBlackList;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self spoofIpEnable])
    {
        [result setValue:[self spoofIpEnable] forKey:@"spoofIpEnable"];
    }
    if([self srcNewConnLimitEnable])
    {
        [result setValue:[self srcNewConnLimitEnable] forKey:@"srcNewConnLimitEnable"];
    }
    if([self srcNewConnLimitValue])
    {
        [result setValue:[self srcNewConnLimitValue] forKey:@"srcNewConnLimitValue"];
    }
    if([self srcConcurrentConnLimitEnable])
    {
        [result setValue:[self srcConcurrentConnLimitEnable] forKey:@"srcConcurrentConnLimitEnable"];
    }
    if([self srcConcurrentConnLimitValue])
    {
        [result setValue:[self srcConcurrentConnLimitValue] forKey:@"srcConcurrentConnLimitValue"];
    }
    if([self dstNewConnLimitEnable])
    {
        [result setValue:[self dstNewConnLimitEnable] forKey:@"dstNewConnLimitEnable"];
    }
    if([self dstNewConnLimitValue])
    {
        [result setValue:[self dstNewConnLimitValue] forKey:@"dstNewConnLimitValue"];
    }
    if([self dstConcurrentConnLimitEnable])
    {
        [result setValue:[self dstConcurrentConnLimitEnable] forKey:@"dstConcurrentConnLimitEnable"];
    }
    if([self dstConcurrentConnLimitValue])
    {
        [result setValue:[self dstConcurrentConnLimitValue] forKey:@"dstConcurrentConnLimitValue"];
    }
    if([self datagramRangeMin])
    {
        [result setValue:[self datagramRangeMin] forKey:@"datagramRangeMin"];
    }
    if([self datagramRangeMax])
    {
        [result setValue:[self datagramRangeMax] forKey:@"datagramRangeMax"];
    }
    if([self geoBlackList])
    {
        [result setValue:[self geoBlackList] forKey:@"geoBlackList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.spoofIpEnable = [dictionary objectForKey:@"spoofIpEnable"];
    self.srcNewConnLimitEnable = [dictionary objectForKey:@"srcNewConnLimitEnable"];
    self.srcNewConnLimitValue = [dictionary objectForKey:@"srcNewConnLimitValue"];
    self.srcConcurrentConnLimitEnable = [dictionary objectForKey:@"srcConcurrentConnLimitEnable"];
    self.srcConcurrentConnLimitValue = [dictionary objectForKey:@"srcConcurrentConnLimitValue"];
    self.dstNewConnLimitEnable = [dictionary objectForKey:@"dstNewConnLimitEnable"];
    self.dstNewConnLimitValue = [dictionary objectForKey:@"dstNewConnLimitValue"];
    self.dstConcurrentConnLimitEnable = [dictionary objectForKey:@"dstConcurrentConnLimitEnable"];
    self.dstConcurrentConnLimitValue = [dictionary objectForKey:@"dstConcurrentConnLimitValue"];
    self.datagramRangeMin = [dictionary objectForKey:@"datagramRangeMin"];
    self.datagramRangeMax = [dictionary objectForKey:@"datagramRangeMax"];
    self.geoBlackList = [dictionary objectForKey:@"geoBlackList"];
    return self;
}
 @end
@implementation ModifyInstanceEPBSpec
-(id) initWithEp:(NSNumber*) ep { 
     self.ep = ep;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ep])
    {
        [result setValue:[self ep] forKey:@"ep"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ep = [dictionary objectForKey:@"ep"];
    return self;
}
 @end
@implementation EPBSpec
-(id) initWithEPB:(NSNumber*) ePB { 
     self.ePB = ePB;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ePB])
    {
        [result setValue:[self ePB] forKey:@"ePB"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ePB = [dictionary objectForKey:@"ePB"];
    return self;
}
 @end
@implementation AlarmConfigSpec
-(id) initWithBlackHoleAlarmEmailStatus:(NSNumber*) blackHoleAlarmEmailStatus
      blackHoleAlarmSmsStatus:(NSNumber*)blackHoleAlarmSmsStatus
      blackHoleAlarmStatus:(NSNumber*)blackHoleAlarmStatus
      ddosAlarmEmailStatus:(NSNumber*)ddosAlarmEmailStatus
      ddosAlarmSmsStatus:(NSNumber*)ddosAlarmSmsStatus
      ddosAlarmStatus:(NSNumber*)ddosAlarmStatus
      errorCodeAlarmStatus:(NSNumber*)errorCodeAlarmStatus
      errorCodeDomain:(NSArray<NSString*>*)errorCodeDomain { 
     self.blackHoleAlarmEmailStatus = blackHoleAlarmEmailStatus;               
     self.blackHoleAlarmSmsStatus = blackHoleAlarmSmsStatus;               
     self.blackHoleAlarmStatus = blackHoleAlarmStatus;               
     self.ddosAlarmEmailStatus = ddosAlarmEmailStatus;               
     self.ddosAlarmSmsStatus = ddosAlarmSmsStatus;               
     self.ddosAlarmStatus = ddosAlarmStatus;               
     self.errorCodeAlarmStatus = errorCodeAlarmStatus;               
     self.errorCodeDomain = errorCodeDomain;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self blackHoleAlarmEmailStatus])
    {
        [result setValue:[self blackHoleAlarmEmailStatus] forKey:@"blackHoleAlarmEmailStatus"];
    }
    if([self blackHoleAlarmSmsStatus])
    {
        [result setValue:[self blackHoleAlarmSmsStatus] forKey:@"blackHoleAlarmSmsStatus"];
    }
    if([self blackHoleAlarmStatus])
    {
        [result setValue:[self blackHoleAlarmStatus] forKey:@"blackHoleAlarmStatus"];
    }
    if([self ddosAlarmEmailStatus])
    {
        [result setValue:[self ddosAlarmEmailStatus] forKey:@"ddosAlarmEmailStatus"];
    }
    if([self ddosAlarmSmsStatus])
    {
        [result setValue:[self ddosAlarmSmsStatus] forKey:@"ddosAlarmSmsStatus"];
    }
    if([self ddosAlarmStatus])
    {
        [result setValue:[self ddosAlarmStatus] forKey:@"ddosAlarmStatus"];
    }
    if([self errorCodeAlarmStatus])
    {
        [result setValue:[self errorCodeAlarmStatus] forKey:@"errorCodeAlarmStatus"];
    }
    if([self errorCodeDomain])
    {
        [result setValue:[self errorCodeDomain] forKey:@"errorCodeDomain"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.blackHoleAlarmEmailStatus = [dictionary objectForKey:@"blackHoleAlarmEmailStatus"];
    self.blackHoleAlarmSmsStatus = [dictionary objectForKey:@"blackHoleAlarmSmsStatus"];
    self.blackHoleAlarmStatus = [dictionary objectForKey:@"blackHoleAlarmStatus"];
    self.ddosAlarmEmailStatus = [dictionary objectForKey:@"ddosAlarmEmailStatus"];
    self.ddosAlarmSmsStatus = [dictionary objectForKey:@"ddosAlarmSmsStatus"];
    self.ddosAlarmStatus = [dictionary objectForKey:@"ddosAlarmStatus"];
    self.errorCodeAlarmStatus = [dictionary objectForKey:@"errorCodeAlarmStatus"];
    self.errorCodeDomain = [dictionary objectForKey:@"errorCodeDomain"];
    return self;
}
 @end
@implementation Certificate
-(id) initWithId:(NSString*) idValue
      name:(NSString*)name
      content:(NSString*)content
      rsaKey:(NSString*)rsaKey
      domain:(NSString*)domain
      from:(NSString*)from
      to:(NSString*)to
      sigAlgName:(NSString*)sigAlgName
      issuer:(NSString*)issuer
      organization:(NSString*)organization
      uploadTime:(NSString*)uploadTime
      associatedDomains:(NSArray<NSString*>*)associatedDomains
      sanDomains:(NSArray<NSString*>*)sanDomains { 
     self.idValue = idValue;               
     self.name = name;               
     self.content = content;               
     self.rsaKey = rsaKey;               
     self.domain = domain;               
     self.from = from;               
     self.to = to;               
     self.sigAlgName = sigAlgName;               
     self.issuer = issuer;               
     self.organization = organization;               
     self.uploadTime = uploadTime;               
     self.associatedDomains = associatedDomains;               
     self.sanDomains = sanDomains;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self content])
    {
        [result setValue:[self content] forKey:@"content"];
    }
    if([self rsaKey])
    {
        [result setValue:[self rsaKey] forKey:@"rsaKey"];
    }
    if([self domain])
    {
        [result setValue:[self domain] forKey:@"domain"];
    }
    if([self from])
    {
        [result setValue:[self from] forKey:@"from"];
    }
    if([self to])
    {
        [result setValue:[self to] forKey:@"to"];
    }
    if([self sigAlgName])
    {
        [result setValue:[self sigAlgName] forKey:@"sigAlgName"];
    }
    if([self issuer])
    {
        [result setValue:[self issuer] forKey:@"issuer"];
    }
    if([self organization])
    {
        [result setValue:[self organization] forKey:@"organization"];
    }
    if([self uploadTime])
    {
        [result setValue:[self uploadTime] forKey:@"uploadTime"];
    }
    if([self associatedDomains])
    {
        [result setValue:[self associatedDomains] forKey:@"associatedDomains"];
    }
    if([self sanDomains])
    {
        [result setValue:[self sanDomains] forKey:@"sanDomains"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.name = [dictionary objectForKey:@"name"];
    self.content = [dictionary objectForKey:@"content"];
    self.rsaKey = [dictionary objectForKey:@"rsaKey"];
    self.domain = [dictionary objectForKey:@"domain"];
    self.from = [dictionary objectForKey:@"from"];
    self.to = [dictionary objectForKey:@"to"];
    self.sigAlgName = [dictionary objectForKey:@"sigAlgName"];
    self.issuer = [dictionary objectForKey:@"issuer"];
    self.organization = [dictionary objectForKey:@"organization"];
    self.uploadTime = [dictionary objectForKey:@"uploadTime"];
    self.associatedDomains = [dictionary objectForKey:@"associatedDomains"];
    self.sanDomains = [dictionary objectForKey:@"sanDomains"];
    return self;
}
 @end
@implementation ForwardWhiteListRule
-(id) initWithStatus:(NSNumber*) status
      ipSetId:(NSString*)ipSetId
      ipSetName:(NSString*)ipSetName
      ip:(NSArray<NSString*>*)ip { 
     self.status = status;               
     self.ipSetId = ipSetId;               
     self.ipSetName = ipSetName;               
     self.ip = ip;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self ipSetId])
    {
        [result setValue:[self ipSetId] forKey:@"ipSetId"];
    }
    if([self ipSetName])
    {
        [result setValue:[self ipSetName] forKey:@"ipSetName"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.status = [dictionary objectForKey:@"status"];
    self.ipSetId = [dictionary objectForKey:@"ipSetId"];
    self.ipSetName = [dictionary objectForKey:@"ipSetName"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
}
 @end
@implementation CCAttackLog
-(id) initWithAttackId:(NSString*) attackId
      attackTraffic:(NSNumber*)attackTraffic
      blackHole:(NSNumber*)blackHole
      startTime:(NSString*)startTime
      endTime:(NSString*)endTime
      unit:(NSString*)unit
      instanceId:(NSString*)instanceId
      name:(NSString*)name { 
     self.attackId = attackId;               
     self.attackTraffic = attackTraffic;               
     self.blackHole = blackHole;               
     self.startTime = startTime;               
     self.endTime = endTime;               
     self.unit = unit;               
     self.instanceId = instanceId;               
     self.name = name;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self attackId])
    {
        [result setValue:[self attackId] forKey:@"attackId"];
    }
    if([self attackTraffic])
    {
        [result setValue:[self attackTraffic] forKey:@"attackTraffic"];
    }
    if([self blackHole])
    {
        [result setValue:[self blackHole] forKey:@"blackHole"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self unit])
    {
        [result setValue:[self unit] forKey:@"unit"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.attackId = [dictionary objectForKey:@"attackId"];
    self.attackTraffic = [dictionary objectForKey:@"attackTraffic"];
    self.blackHole = [dictionary objectForKey:@"blackHole"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.unit = [dictionary objectForKey:@"unit"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.name = [dictionary objectForKey:@"name"];
    return self;
}
 @end
@implementation IpSetSpec
-(id) initWithName:(NSString*) name
      ip:(NSArray<NSString*>*)ip { 
     self.name = name;               
     self.ip = ip;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.ip = [dictionary objectForKey:@"ip"];
    return self;
}
 @end
@implementation CertInfoModifySpec
-(id) initWithCertId:(NSString*) certId
      httpsCertContent:(NSString*)httpsCertContent
      httpsRsaKey:(NSString*)httpsRsaKey { 
     self.certId = certId;               
     self.httpsCertContent = httpsCertContent;               
     self.httpsRsaKey = httpsRsaKey;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self certId])
    {
        [result setValue:[self certId] forKey:@"certId"];
    }
    if([self httpsCertContent])
    {
        [result setValue:[self httpsCertContent] forKey:@"httpsCertContent"];
    }
    if([self httpsRsaKey])
    {
        [result setValue:[self httpsRsaKey] forKey:@"httpsRsaKey"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.certId = [dictionary objectForKey:@"certId"];
    self.httpsCertContent = [dictionary objectForKey:@"httpsCertContent"];
    self.httpsRsaKey = [dictionary objectForKey:@"httpsRsaKey"];
    return self;
}
 @end
@implementation Status
-(id) initWithRetcode:(NSNumber*) retcode
      code:(NSNumber*)code
      msg:(NSString*)msg { 
     self.retcode = retcode;               
     self.code = code;               
     self.msg = msg;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self retcode])
    {
        [result setValue:[self retcode] forKey:@"retcode"];
    }
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self msg])
    {
        [result setValue:[self msg] forKey:@"msg"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.retcode = [dictionary objectForKey:@"retcode"];
    self.code = [dictionary objectForKey:@"code"];
    self.msg = [dictionary objectForKey:@"msg"];
    return self;
}
 @end
@implementation CCDefaultThresholds
-(id) initWithHostQps:(NSNumber*) hostQps
      hostUrlQps:(NSNumber*)hostUrlQps
      ipHostQps:(NSNumber*)ipHostQps
      ipHostUrlQps:(NSNumber*)ipHostUrlQps { 
     self.hostQps = hostQps;               
     self.hostUrlQps = hostUrlQps;               
     self.ipHostQps = ipHostQps;               
     self.ipHostUrlQps = ipHostUrlQps;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self hostQps])
    {
        [result setValue:[self hostQps] forKey:@"hostQps"];
    }
    if([self hostUrlQps])
    {
        [result setValue:[self hostUrlQps] forKey:@"hostUrlQps"];
    }
    if([self ipHostQps])
    {
        [result setValue:[self ipHostQps] forKey:@"ipHostQps"];
    }
    if([self ipHostUrlQps])
    {
        [result setValue:[self ipHostUrlQps] forKey:@"ipHostUrlQps"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.hostQps = [dictionary objectForKey:@"hostQps"];
    self.hostUrlQps = [dictionary objectForKey:@"hostUrlQps"];
    self.ipHostQps = [dictionary objectForKey:@"ipHostQps"];
    self.ipHostUrlQps = [dictionary objectForKey:@"ipHostUrlQps"];
    return self;
}
 @end
@implementation CreateInstanceSpec
-(id) initWithId:(NSString*) idValue
      name:(NSString*)name
      buyType:(NSNumber*)buyType
      carrier:(NSNumber*)carrier
      ipType:(NSNumber*)ipType
      bp:(NSNumber*)bp
      ep:(NSNumber*)ep
      bw:(NSNumber*)bw
      timeSpan:(NSNumber*)timeSpan
      timeUnit:(NSNumber*)timeUnit
      returnUrl:(NSString*)returnUrl { 
     self.idValue = idValue;               
     self.name = name;               
     self.buyType = buyType;               
     self.carrier = carrier;               
     self.ipType = ipType;               
     self.bp = bp;               
     self.ep = ep;               
     self.bw = bw;               
     self.timeSpan = timeSpan;               
     self.timeUnit = timeUnit;               
     self.returnUrl = returnUrl;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self buyType])
    {
        [result setValue:[self buyType] forKey:@"buyType"];
    }
    if([self carrier])
    {
        [result setValue:[self carrier] forKey:@"carrier"];
    }
    if([self ipType])
    {
        [result setValue:[self ipType] forKey:@"ipType"];
    }
    if([self bp])
    {
        [result setValue:[self bp] forKey:@"bp"];
    }
    if([self ep])
    {
        [result setValue:[self ep] forKey:@"ep"];
    }
    if([self bw])
    {
        [result setValue:[self bw] forKey:@"bw"];
    }
    if([self timeSpan])
    {
        [result setValue:[self timeSpan] forKey:@"timeSpan"];
    }
    if([self timeUnit])
    {
        [result setValue:[self timeUnit] forKey:@"timeUnit"];
    }
    if([self returnUrl])
    {
        [result setValue:[self returnUrl] forKey:@"returnUrl"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.name = [dictionary objectForKey:@"name"];
    self.buyType = [dictionary objectForKey:@"buyType"];
    self.carrier = [dictionary objectForKey:@"carrier"];
    self.ipType = [dictionary objectForKey:@"ipType"];
    self.bp = [dictionary objectForKey:@"bp"];
    self.ep = [dictionary objectForKey:@"ep"];
    self.bw = [dictionary objectForKey:@"bw"];
    self.timeSpan = [dictionary objectForKey:@"timeSpan"];
    self.timeUnit = [dictionary objectForKey:@"timeUnit"];
    self.returnUrl = [dictionary objectForKey:@"returnUrl"];
    return self;
}
 @end
@implementation ProtectionStatistics
-(id) initWithInstancesCount:(NSNumber*) instancesCount
      protectedCount:(NSNumber*)protectedCount
      protectedDay:(NSNumber*)protectedDay { 
     self.instancesCount = instancesCount;               
     self.protectedCount = protectedCount;               
     self.protectedDay = protectedDay;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instancesCount])
    {
        [result setValue:[self instancesCount] forKey:@"instancesCount"];
    }
    if([self protectedCount])
    {
        [result setValue:[self protectedCount] forKey:@"protectedCount"];
    }
    if([self protectedDay])
    {
        [result setValue:[self protectedDay] forKey:@"protectedDay"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instancesCount = [dictionary objectForKey:@"instancesCount"];
    self.protectedCount = [dictionary objectForKey:@"protectedCount"];
    self.protectedDay = [dictionary objectForKey:@"protectedDay"];
    return self;
}
 @end
@implementation VpcIpResource
-(id) initWithIp:(NSString*) ip
      binded:(NSNumber*)binded
      resourceType:(NSNumber*)resourceType { 
     self.ip = ip;               
     self.binded = binded;               
     self.resourceType = resourceType;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self ip])
    {
        [result setValue:[self ip] forKey:@"ip"];
    }
    if([self binded])
    {
        [result setValue:[self binded] forKey:@"binded"];
    }
    if([self resourceType])
    {
        [result setValue:[self resourceType] forKey:@"resourceType"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.ip = [dictionary objectForKey:@"ip"];
    self.binded = [dictionary objectForKey:@"binded"];
    self.resourceType = [dictionary objectForKey:@"resourceType"];
    return self;
}
 @end
@implementation CCProtectionRule
-(id) initWithId:(NSString*) idValue
      webRuleId:(NSString*)webRuleId
      instanceId:(NSString*)instanceId
      name:(NSString*)name
      enable:(NSNumber*)enable
      uri:(NSString*)uri
      matchType:(NSNumber*)matchType
      detectPeriod:(NSNumber*)detectPeriod
      singleIpLimit:(NSNumber*)singleIpLimit
      blockType:(NSNumber*)blockType
      blockTime:(NSNumber*)blockTime { 
     self.idValue = idValue;               
     self.webRuleId = webRuleId;               
     self.instanceId = instanceId;               
     self.name = name;               
     self.enable = enable;               
     self.uri = uri;               
     self.matchType = matchType;               
     self.detectPeriod = detectPeriod;               
     self.singleIpLimit = singleIpLimit;               
     self.blockType = blockType;               
     self.blockTime = blockTime;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self webRuleId])
    {
        [result setValue:[self webRuleId] forKey:@"webRuleId"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self enable])
    {
        [result setValue:[self enable] forKey:@"enable"];
    }
    if([self uri])
    {
        [result setValue:[self uri] forKey:@"uri"];
    }
    if([self matchType])
    {
        [result setValue:[self matchType] forKey:@"matchType"];
    }
    if([self detectPeriod])
    {
        [result setValue:[self detectPeriod] forKey:@"detectPeriod"];
    }
    if([self singleIpLimit])
    {
        [result setValue:[self singleIpLimit] forKey:@"singleIpLimit"];
    }
    if([self blockType])
    {
        [result setValue:[self blockType] forKey:@"blockType"];
    }
    if([self blockTime])
    {
        [result setValue:[self blockTime] forKey:@"blockTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.webRuleId = [dictionary objectForKey:@"webRuleId"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.name = [dictionary objectForKey:@"name"];
    self.enable = [dictionary objectForKey:@"enable"];
    self.uri = [dictionary objectForKey:@"uri"];
    self.matchType = [dictionary objectForKey:@"matchType"];
    self.detectPeriod = [dictionary objectForKey:@"detectPeriod"];
    self.singleIpLimit = [dictionary objectForKey:@"singleIpLimit"];
    self.blockType = [dictionary objectForKey:@"blockType"];
    self.blockTime = [dictionary objectForKey:@"blockTime"];
    return self;
}
 @end
@implementation WebWhiteListRuleSpec
-(id) initWithName:(NSString*) name
      mode:(NSNumber*)mode
      key:(NSString*)key
      value:(NSString*)value
      pattern:(NSNumber*)pattern
      action:(NSNumber*)action
      status:(NSNumber*)status { 
     self.name = name;               
     self.mode = mode;               
     self.key = key;               
     self.value = value;               
     self.pattern = pattern;               
     self.action = action;               
     self.status = status;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self mode])
    {
        [result setValue:[self mode] forKey:@"mode"];
    }
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    if([self pattern])
    {
        [result setValue:[self pattern] forKey:@"pattern"];
    }
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.name = [dictionary objectForKey:@"name"];
    self.mode = [dictionary objectForKey:@"mode"];
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    self.pattern = [dictionary objectForKey:@"pattern"];
    self.action = [dictionary objectForKey:@"action"];
    self.status = [dictionary objectForKey:@"status"];
    return self;
}
 @end
@implementation WebRule
-(id) initWithId:(NSString*) idValue
      instanceId:(NSString*)instanceId
      domain:(NSString*)domain
      cname:(NSString*)cname
      cnameStatus:(NSNumber*)cnameStatus
      protocol:(WebRuleProtocol*)protocol
      customPortStatus:(NSNumber*)customPortStatus
      port:(NSArray<NSNumber*>*)port
      httpsPort:(NSArray<NSNumber*>*)httpsPort
      httpOrigin:(NSNumber*)httpOrigin
      status:(NSNumber*)status
      originType:(NSString*)originType
      originAddr:(NSArray<OriginAddrItem*>*)originAddr
      originDomain:(NSString*)originDomain
      onlineAddr:(NSArray<NSString*>*)onlineAddr
      httpCertStatus:(NSNumber*)httpCertStatus
      certId:(NSString*)certId
      certName:(NSString*)certName
      httpsCertContent:(NSString*)httpsCertContent
      httpsRsaKey:(NSString*)httpsRsaKey
      forceJump:(NSNumber*)forceJump
      algorithm:(NSString*)algorithm
      ccStatus:(NSNumber*)ccStatus
      webSocketStatus:(NSNumber*)webSocketStatus
      blackListEnable:(NSNumber*)blackListEnable
      whiteListEnable:(NSNumber*)whiteListEnable { 
     self.idValue = idValue;               
     self.instanceId = instanceId;               
     self.domain = domain;               
     self.cname = cname;               
     self.cnameStatus = cnameStatus;               
     self.protocol = protocol;               
     self.customPortStatus = customPortStatus;               
     self.port = port;               
     self.httpsPort = httpsPort;               
     self.httpOrigin = httpOrigin;               
     self.status = status;               
     self.originType = originType;               
     self.originAddr = originAddr;               
     self.originDomain = originDomain;               
     self.onlineAddr = onlineAddr;               
     self.httpCertStatus = httpCertStatus;               
     self.certId = certId;               
     self.certName = certName;               
     self.httpsCertContent = httpsCertContent;               
     self.httpsRsaKey = httpsRsaKey;               
     self.forceJump = forceJump;               
     self.algorithm = algorithm;               
     self.ccStatus = ccStatus;               
     self.webSocketStatus = webSocketStatus;               
     self.blackListEnable = blackListEnable;               
     self.whiteListEnable = whiteListEnable;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self domain])
    {
        [result setValue:[self domain] forKey:@"domain"];
    }
    if([self cname])
    {
        [result setValue:[self cname] forKey:@"cname"];
    }
    if([self cnameStatus])
    {
        [result setValue:[self cnameStatus] forKey:@"cnameStatus"];
    }
    if([self protocol])
    {
        [result setValue:[[self protocol] dictionary]forKey:@"protocol"];
    }
    if([self customPortStatus])
    {
        [result setValue:[self customPortStatus] forKey:@"customPortStatus"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self httpsPort])
    {
        [result setValue:[self httpsPort] forKey:@"httpsPort"];
    }
    if([self httpOrigin])
    {
        [result setValue:[self httpOrigin] forKey:@"httpOrigin"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self originType])
    {
        [result setValue:[self originType] forKey:@"originType"];
    }
    if([self originAddr])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self originAddr] count]; i++) {
            OriginAddrItem* item = [[self originAddr] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"originAddr"];
    }
    if([self originDomain])
    {
        [result setValue:[self originDomain] forKey:@"originDomain"];
    }
    if([self onlineAddr])
    {
        [result setValue:[self onlineAddr] forKey:@"onlineAddr"];
    }
    if([self httpCertStatus])
    {
        [result setValue:[self httpCertStatus] forKey:@"httpCertStatus"];
    }
    if([self certId])
    {
        [result setValue:[self certId] forKey:@"certId"];
    }
    if([self certName])
    {
        [result setValue:[self certName] forKey:@"certName"];
    }
    if([self httpsCertContent])
    {
        [result setValue:[self httpsCertContent] forKey:@"httpsCertContent"];
    }
    if([self httpsRsaKey])
    {
        [result setValue:[self httpsRsaKey] forKey:@"httpsRsaKey"];
    }
    if([self forceJump])
    {
        [result setValue:[self forceJump] forKey:@"forceJump"];
    }
    if([self algorithm])
    {
        [result setValue:[self algorithm] forKey:@"algorithm"];
    }
    if([self ccStatus])
    {
        [result setValue:[self ccStatus] forKey:@"ccStatus"];
    }
    if([self webSocketStatus])
    {
        [result setValue:[self webSocketStatus] forKey:@"webSocketStatus"];
    }
    if([self blackListEnable])
    {
        [result setValue:[self blackListEnable] forKey:@"blackListEnable"];
    }
    if([self whiteListEnable])
    {
        [result setValue:[self whiteListEnable] forKey:@"whiteListEnable"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.domain = [dictionary objectForKey:@"domain"];
    self.cname = [dictionary objectForKey:@"cname"];
    self.cnameStatus = [dictionary objectForKey:@"cnameStatus"];
    self.protocol = [[WebRuleProtocol alloc]initWithDic:[dictionary objectForKey:@"protocol"]];
    self.customPortStatus = [dictionary objectForKey:@"customPortStatus"];
    self.port = [dictionary objectForKey:@"port"];
    self.httpsPort = [dictionary objectForKey:@"httpsPort"];
    self.httpOrigin = [dictionary objectForKey:@"httpOrigin"];
    self.status = [dictionary objectForKey:@"status"];
    self.originType = [dictionary objectForKey:@"originType"];
    NSArray* originAddrArray = [dictionary objectForKey:@"originAddr"];
    if(originAddrArray&&![originAddrArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [originAddrArray count];i++)
        {
            OriginAddrItem* item = [[OriginAddrItem alloc]initWithDic:[originAddrArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.originAddr = propertyArray;
    }
    self.originDomain = [dictionary objectForKey:@"originDomain"];
    self.onlineAddr = [dictionary objectForKey:@"onlineAddr"];
    self.httpCertStatus = [dictionary objectForKey:@"httpCertStatus"];
    self.certId = [dictionary objectForKey:@"certId"];
    self.certName = [dictionary objectForKey:@"certName"];
    self.httpsCertContent = [dictionary objectForKey:@"httpsCertContent"];
    self.httpsRsaKey = [dictionary objectForKey:@"httpsRsaKey"];
    self.forceJump = [dictionary objectForKey:@"forceJump"];
    self.algorithm = [dictionary objectForKey:@"algorithm"];
    self.ccStatus = [dictionary objectForKey:@"ccStatus"];
    self.webSocketStatus = [dictionary objectForKey:@"webSocketStatus"];
    self.blackListEnable = [dictionary objectForKey:@"blackListEnable"];
    self.whiteListEnable = [dictionary objectForKey:@"whiteListEnable"];
    return self;
}
 @end
@implementation WebRuleSpec
-(id) initWithDomain:(NSString*) domain
      protocol:(WebRuleProtocol*)protocol
      port:(NSArray<NSNumber*>*)port
      httpsPort:(NSArray<NSNumber*>*)httpsPort
      originType:(NSString*)originType
      originAddr:(NSArray<OriginAddrItem*>*)originAddr
      onlineAddr:(NSArray<NSString*>*)onlineAddr
      originDomain:(NSString*)originDomain
      algorithm:(NSString*)algorithm
      forceJump:(NSNumber*)forceJump
      customPortStatus:(NSNumber*)customPortStatus
      httpOrigin:(NSNumber*)httpOrigin
      webSocketStatus:(NSNumber*)webSocketStatus
      httpsCertContent:(NSString*)httpsCertContent
      httpsRsaKey:(NSString*)httpsRsaKey
      certId:(NSString*)certId { 
     self.domain = domain;               
     self.protocol = protocol;               
     self.port = port;               
     self.httpsPort = httpsPort;               
     self.originType = originType;               
     self.originAddr = originAddr;               
     self.onlineAddr = onlineAddr;               
     self.originDomain = originDomain;               
     self.algorithm = algorithm;               
     self.forceJump = forceJump;               
     self.customPortStatus = customPortStatus;               
     self.httpOrigin = httpOrigin;               
     self.webSocketStatus = webSocketStatus;               
     self.httpsCertContent = httpsCertContent;               
     self.httpsRsaKey = httpsRsaKey;               
     self.certId = certId;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self domain])
    {
        [result setValue:[self domain] forKey:@"domain"];
    }
    if([self protocol])
    {
        [result setValue:[[self protocol] dictionary]forKey:@"protocol"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self httpsPort])
    {
        [result setValue:[self httpsPort] forKey:@"httpsPort"];
    }
    if([self originType])
    {
        [result setValue:[self originType] forKey:@"originType"];
    }
    if([self originAddr])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self originAddr] count]; i++) {
            OriginAddrItem* item = [[self originAddr] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"originAddr"];
    }
    if([self onlineAddr])
    {
        [result setValue:[self onlineAddr] forKey:@"onlineAddr"];
    }
    if([self originDomain])
    {
        [result setValue:[self originDomain] forKey:@"originDomain"];
    }
    if([self algorithm])
    {
        [result setValue:[self algorithm] forKey:@"algorithm"];
    }
    if([self forceJump])
    {
        [result setValue:[self forceJump] forKey:@"forceJump"];
    }
    if([self customPortStatus])
    {
        [result setValue:[self customPortStatus] forKey:@"customPortStatus"];
    }
    if([self httpOrigin])
    {
        [result setValue:[self httpOrigin] forKey:@"httpOrigin"];
    }
    if([self webSocketStatus])
    {
        [result setValue:[self webSocketStatus] forKey:@"webSocketStatus"];
    }
    if([self httpsCertContent])
    {
        [result setValue:[self httpsCertContent] forKey:@"httpsCertContent"];
    }
    if([self httpsRsaKey])
    {
        [result setValue:[self httpsRsaKey] forKey:@"httpsRsaKey"];
    }
    if([self certId])
    {
        [result setValue:[self certId] forKey:@"certId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.domain = [dictionary objectForKey:@"domain"];
    self.protocol = [[WebRuleProtocol alloc]initWithDic:[dictionary objectForKey:@"protocol"]];
    self.port = [dictionary objectForKey:@"port"];
    self.httpsPort = [dictionary objectForKey:@"httpsPort"];
    self.originType = [dictionary objectForKey:@"originType"];
    NSArray* originAddrArray = [dictionary objectForKey:@"originAddr"];
    if(originAddrArray&&![originAddrArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [originAddrArray count];i++)
        {
            OriginAddrItem* item = [[OriginAddrItem alloc]initWithDic:[originAddrArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.originAddr = propertyArray;
    }
    self.onlineAddr = [dictionary objectForKey:@"onlineAddr"];
    self.originDomain = [dictionary objectForKey:@"originDomain"];
    self.algorithm = [dictionary objectForKey:@"algorithm"];
    self.forceJump = [dictionary objectForKey:@"forceJump"];
    self.customPortStatus = [dictionary objectForKey:@"customPortStatus"];
    self.httpOrigin = [dictionary objectForKey:@"httpOrigin"];
    self.webSocketStatus = [dictionary objectForKey:@"webSocketStatus"];
    self.httpsCertContent = [dictionary objectForKey:@"httpsCertContent"];
    self.httpsRsaKey = [dictionary objectForKey:@"httpsRsaKey"];
    self.certId = [dictionary objectForKey:@"certId"];
    return self;
}
 @end
@implementation ForwardRule
-(id) initWithId:(NSString*) idValue
      instanceId:(NSString*)instanceId
      protocol:(NSString*)protocol
      cname:(NSString*)cname
      originType:(NSString*)originType
      port:(NSNumber*)port
      algorithm:(NSString*)algorithm
      originAddr:(NSArray<OriginAddrItem*>*)originAddr
      onlineAddr:(NSArray<NSString*>*)onlineAddr
      originDomain:(NSString*)originDomain
      originPort:(NSNumber*)originPort
      status:(NSNumber*)status { 
     self.idValue = idValue;               
     self.instanceId = instanceId;               
     self.protocol = protocol;               
     self.cname = cname;               
     self.originType = originType;               
     self.port = port;               
     self.algorithm = algorithm;               
     self.originAddr = originAddr;               
     self.onlineAddr = onlineAddr;               
     self.originDomain = originDomain;               
     self.originPort = originPort;               
     self.status = status;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self protocol])
    {
        [result setValue:[self protocol] forKey:@"protocol"];
    }
    if([self cname])
    {
        [result setValue:[self cname] forKey:@"cname"];
    }
    if([self originType])
    {
        [result setValue:[self originType] forKey:@"originType"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self algorithm])
    {
        [result setValue:[self algorithm] forKey:@"algorithm"];
    }
    if([self originAddr])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self originAddr] count]; i++) {
            OriginAddrItem* item = [[self originAddr] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"originAddr"];
    }
    if([self onlineAddr])
    {
        [result setValue:[self onlineAddr] forKey:@"onlineAddr"];
    }
    if([self originDomain])
    {
        [result setValue:[self originDomain] forKey:@"originDomain"];
    }
    if([self originPort])
    {
        [result setValue:[self originPort] forKey:@"originPort"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.protocol = [dictionary objectForKey:@"protocol"];
    self.cname = [dictionary objectForKey:@"cname"];
    self.originType = [dictionary objectForKey:@"originType"];
    self.port = [dictionary objectForKey:@"port"];
    self.algorithm = [dictionary objectForKey:@"algorithm"];
    NSArray* originAddrArray = [dictionary objectForKey:@"originAddr"];
    if(originAddrArray&&![originAddrArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [originAddrArray count];i++)
        {
            OriginAddrItem* item = [[OriginAddrItem alloc]initWithDic:[originAddrArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.originAddr = propertyArray;
    }
    self.onlineAddr = [dictionary objectForKey:@"onlineAddr"];
    self.originDomain = [dictionary objectForKey:@"originDomain"];
    self.originPort = [dictionary objectForKey:@"originPort"];
    self.status = [dictionary objectForKey:@"status"];
    return self;
}
 @end
@implementation WebWhiteListRule
-(id) initWithId:(NSString*) idValue
      name:(NSString*)name
      mode:(NSNumber*)mode
      key:(NSString*)key
      value:(NSString*)value
      pattern:(NSNumber*)pattern
      action:(NSNumber*)action
      status:(NSNumber*)status
      geoList:(NSArray<Geo*>*)geoList { 
     self.idValue = idValue;               
     self.name = name;               
     self.mode = mode;               
     self.key = key;               
     self.value = value;               
     self.pattern = pattern;               
     self.action = action;               
     self.status = status;               
     self.geoList = geoList;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self mode])
    {
        [result setValue:[self mode] forKey:@"mode"];
    }
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    if([self pattern])
    {
        [result setValue:[self pattern] forKey:@"pattern"];
    }
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self geoList])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self geoList] count]; i++) {
            Geo* item = [[self geoList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"geoList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.name = [dictionary objectForKey:@"name"];
    self.mode = [dictionary objectForKey:@"mode"];
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    self.pattern = [dictionary objectForKey:@"pattern"];
    self.action = [dictionary objectForKey:@"action"];
    self.status = [dictionary objectForKey:@"status"];
    NSArray* geoListArray = [dictionary objectForKey:@"geoList"];
    if(geoListArray&&![geoListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [geoListArray count];i++)
        {
            Geo* item = [[Geo alloc]initWithDic:[geoListArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.geoList = propertyArray;
    }
    return self;
}
 @end
@implementation ForwardRuleSpec
-(id) initWithProtocol:(NSString*) protocol
      port:(NSNumber*)port
      algorithm:(NSString*)algorithm
      originType:(NSString*)originType
      originAddr:(NSArray<OriginAddrItem*>*)originAddr
      onlineAddr:(NSArray<NSString*>*)onlineAddr
      originDomain:(NSString*)originDomain
      originPort:(NSNumber*)originPort { 
     self.protocol = protocol;               
     self.port = port;               
     self.algorithm = algorithm;               
     self.originType = originType;               
     self.originAddr = originAddr;               
     self.onlineAddr = onlineAddr;               
     self.originDomain = originDomain;               
     self.originPort = originPort;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self protocol])
    {
        [result setValue:[self protocol] forKey:@"protocol"];
    }
    if([self port])
    {
        [result setValue:[self port] forKey:@"port"];
    }
    if([self algorithm])
    {
        [result setValue:[self algorithm] forKey:@"algorithm"];
    }
    if([self originType])
    {
        [result setValue:[self originType] forKey:@"originType"];
    }
    if([self originAddr])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self originAddr] count]; i++) {
            OriginAddrItem* item = [[self originAddr] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"originAddr"];
    }
    if([self onlineAddr])
    {
        [result setValue:[self onlineAddr] forKey:@"onlineAddr"];
    }
    if([self originDomain])
    {
        [result setValue:[self originDomain] forKey:@"originDomain"];
    }
    if([self originPort])
    {
        [result setValue:[self originPort] forKey:@"originPort"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.protocol = [dictionary objectForKey:@"protocol"];
    self.port = [dictionary objectForKey:@"port"];
    self.algorithm = [dictionary objectForKey:@"algorithm"];
    self.originType = [dictionary objectForKey:@"originType"];
    NSArray* originAddrArray = [dictionary objectForKey:@"originAddr"];
    if(originAddrArray&&![originAddrArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [originAddrArray count];i++)
        {
            OriginAddrItem* item = [[OriginAddrItem alloc]initWithDic:[originAddrArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.originAddr = propertyArray;
    }
    self.onlineAddr = [dictionary objectForKey:@"onlineAddr"];
    self.originDomain = [dictionary objectForKey:@"originDomain"];
    self.originPort = [dictionary objectForKey:@"originPort"];
    return self;
}
 @end
@implementation ForwardProtectionRule
-(id) initWithSpoofIpEnable:(NSNumber*) spoofIpEnable
      srcNewConnLimitEnable:(NSNumber*)srcNewConnLimitEnable
      srcNewConnLimitValue:(NSNumber*)srcNewConnLimitValue
      srcConcurrentConnLimitEnable:(NSNumber*)srcConcurrentConnLimitEnable
      srcConcurrentConnLimitValue:(NSNumber*)srcConcurrentConnLimitValue
      dstNewConnLimitEnable:(NSNumber*)dstNewConnLimitEnable
      dstNewConnLimitValue:(NSNumber*)dstNewConnLimitValue
      dstConcurrentConnLimitEnable:(NSNumber*)dstConcurrentConnLimitEnable
      dstConcurrentConnLimitValue:(NSNumber*)dstConcurrentConnLimitValue
      datagramRangeMin:(NSNumber*)datagramRangeMin
      datagramRangeMax:(NSNumber*)datagramRangeMax
      geoBlackList:(NSArray<Geo*>*)geoBlackList { 
     self.spoofIpEnable = spoofIpEnable;               
     self.srcNewConnLimitEnable = srcNewConnLimitEnable;               
     self.srcNewConnLimitValue = srcNewConnLimitValue;               
     self.srcConcurrentConnLimitEnable = srcConcurrentConnLimitEnable;               
     self.srcConcurrentConnLimitValue = srcConcurrentConnLimitValue;               
     self.dstNewConnLimitEnable = dstNewConnLimitEnable;               
     self.dstNewConnLimitValue = dstNewConnLimitValue;               
     self.dstConcurrentConnLimitEnable = dstConcurrentConnLimitEnable;               
     self.dstConcurrentConnLimitValue = dstConcurrentConnLimitValue;               
     self.datagramRangeMin = datagramRangeMin;               
     self.datagramRangeMax = datagramRangeMax;               
     self.geoBlackList = geoBlackList;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self spoofIpEnable])
    {
        [result setValue:[self spoofIpEnable] forKey:@"spoofIpEnable"];
    }
    if([self srcNewConnLimitEnable])
    {
        [result setValue:[self srcNewConnLimitEnable] forKey:@"srcNewConnLimitEnable"];
    }
    if([self srcNewConnLimitValue])
    {
        [result setValue:[self srcNewConnLimitValue] forKey:@"srcNewConnLimitValue"];
    }
    if([self srcConcurrentConnLimitEnable])
    {
        [result setValue:[self srcConcurrentConnLimitEnable] forKey:@"srcConcurrentConnLimitEnable"];
    }
    if([self srcConcurrentConnLimitValue])
    {
        [result setValue:[self srcConcurrentConnLimitValue] forKey:@"srcConcurrentConnLimitValue"];
    }
    if([self dstNewConnLimitEnable])
    {
        [result setValue:[self dstNewConnLimitEnable] forKey:@"dstNewConnLimitEnable"];
    }
    if([self dstNewConnLimitValue])
    {
        [result setValue:[self dstNewConnLimitValue] forKey:@"dstNewConnLimitValue"];
    }
    if([self dstConcurrentConnLimitEnable])
    {
        [result setValue:[self dstConcurrentConnLimitEnable] forKey:@"dstConcurrentConnLimitEnable"];
    }
    if([self dstConcurrentConnLimitValue])
    {
        [result setValue:[self dstConcurrentConnLimitValue] forKey:@"dstConcurrentConnLimitValue"];
    }
    if([self datagramRangeMin])
    {
        [result setValue:[self datagramRangeMin] forKey:@"datagramRangeMin"];
    }
    if([self datagramRangeMax])
    {
        [result setValue:[self datagramRangeMax] forKey:@"datagramRangeMax"];
    }
    if([self geoBlackList])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self geoBlackList] count]; i++) {
            Geo* item = [[self geoBlackList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"geoBlackList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.spoofIpEnable = [dictionary objectForKey:@"spoofIpEnable"];
    self.srcNewConnLimitEnable = [dictionary objectForKey:@"srcNewConnLimitEnable"];
    self.srcNewConnLimitValue = [dictionary objectForKey:@"srcNewConnLimitValue"];
    self.srcConcurrentConnLimitEnable = [dictionary objectForKey:@"srcConcurrentConnLimitEnable"];
    self.srcConcurrentConnLimitValue = [dictionary objectForKey:@"srcConcurrentConnLimitValue"];
    self.dstNewConnLimitEnable = [dictionary objectForKey:@"dstNewConnLimitEnable"];
    self.dstNewConnLimitValue = [dictionary objectForKey:@"dstNewConnLimitValue"];
    self.dstConcurrentConnLimitEnable = [dictionary objectForKey:@"dstConcurrentConnLimitEnable"];
    self.dstConcurrentConnLimitValue = [dictionary objectForKey:@"dstConcurrentConnLimitValue"];
    self.datagramRangeMin = [dictionary objectForKey:@"datagramRangeMin"];
    self.datagramRangeMax = [dictionary objectForKey:@"datagramRangeMax"];
    NSArray* geoBlackListArray = [dictionary objectForKey:@"geoBlackList"];
    if(geoBlackListArray&&![geoBlackListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [geoBlackListArray count];i++)
        {
            Geo* item = [[Geo alloc]initWithDic:[geoBlackListArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.geoBlackList = propertyArray;
    }
    return self;
}
 @end
@implementation Country
-(id) initWithLabel:(NSString*) label
      value:(NSString*)value
      children:(NSArray<Country*>*)children { 
     self.label = label;               
     self.value = value;               
     self.children = children;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self label])
    {
        [result setValue:[self label] forKey:@"label"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    if([self children])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self children] count]; i++) {
            Country* item = [[self children] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"children"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.label = [dictionary objectForKey:@"label"];
    self.value = [dictionary objectForKey:@"value"];
    NSArray* childrenArray = [dictionary objectForKey:@"children"];
    if(childrenArray&&![childrenArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [childrenArray count];i++)
        {
            Country* item = [[Country alloc]initWithDic:[childrenArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.children = propertyArray;
    }
    return self;
}
 @end
@implementation WebBlackListRule
-(id) initWithId:(NSString*) idValue
      name:(NSString*)name
      mode:(NSNumber*)mode
      key:(NSString*)key
      value:(NSString*)value
      pattern:(NSNumber*)pattern
      action:(NSNumber*)action
      actionValue:(NSString*)actionValue
      status:(NSNumber*)status
      geoList:(NSArray<Geo*>*)geoList { 
     self.idValue = idValue;               
     self.name = name;               
     self.mode = mode;               
     self.key = key;               
     self.value = value;               
     self.pattern = pattern;               
     self.action = action;               
     self.actionValue = actionValue;               
     self.status = status;               
     self.geoList = geoList;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self idValue])
    {
        [result setValue:[self idValue] forKey:@"id"];
    }
    if([self name])
    {
        [result setValue:[self name] forKey:@"name"];
    }
    if([self mode])
    {
        [result setValue:[self mode] forKey:@"mode"];
    }
    if([self key])
    {
        [result setValue:[self key] forKey:@"key"];
    }
    if([self value])
    {
        [result setValue:[self value] forKey:@"value"];
    }
    if([self pattern])
    {
        [result setValue:[self pattern] forKey:@"pattern"];
    }
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self actionValue])
    {
        [result setValue:[self actionValue] forKey:@"actionValue"];
    }
    if([self status])
    {
        [result setValue:[self status] forKey:@"status"];
    }
    if([self geoList])
    {
        NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
        for (int i =0 ; i< [[self geoList] count]; i++) {
            Geo* item = [[self geoList] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"geoList"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.idValue = [dictionary objectForKey:@"id"];
    self.name = [dictionary objectForKey:@"name"];
    self.mode = [dictionary objectForKey:@"mode"];
    self.key = [dictionary objectForKey:@"key"];
    self.value = [dictionary objectForKey:@"value"];
    self.pattern = [dictionary objectForKey:@"pattern"];
    self.action = [dictionary objectForKey:@"action"];
    self.actionValue = [dictionary objectForKey:@"actionValue"];
    self.status = [dictionary objectForKey:@"status"];
    NSArray* geoListArray = [dictionary objectForKey:@"geoList"];
    if(geoListArray&&![geoListArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [geoListArray count];i++)
        {
            Geo* item = [[Geo alloc]initWithDic:[geoListArray objectAtIndex:i]];
            if(item)
            {
                [propertyArray addObject:item];
            }
        }
        self.geoList = propertyArray;
    }
    return self;
}
 @end
 
 


